import { NgModule, ErrorHandler } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { MyApp } from './app.component';
import { HttpClientModule,HttpClient } from '@angular/common/http';

import { AlertsPage } from '../pages/alerts/alerts';
import { FavoritesPage } from '../pages/favorites/favorites';
import { HomePage } from '../pages/home/home';
import { MypostPage } from '../pages/home/mypost/mypost';
import { PostrentPage } from '../pages/home/mypost/rent/rent';
import { PostbuyPage } from '../pages/home/mypost/buy/buy';
import { PostperPage } from '../pages/home/mypost/per/per';
import { PostservicePage } from '../pages/home/mypost/service/service';
import { TabsPage } from '../pages/tabs/tabs';
import { LoginPage } from '../pages/login/login';
import { RegistPage } from '../pages/regist/regist';
import { MessagesPage } from '../pages/messages/messages';
import { CheckPage } from '../pages/messages/check/check';
import { MoveoutPage } from '../pages/messages/moveout/moveout';
import { MorePage } from '../pages/more/more';
import { HomelistPage } from '../pages/homelist/homelist';
import { FilterPage } from '../pages/filter/filter';
import { ProductrentPage } from '../pages/product/rent/rent';
import { ProductbuyPage } from '../pages/product/buy/buy';
import { ProductperPage } from '../pages/product/per/per';
import { ProductservicePage } from '../pages/product/service/service';
import { HouseChoosePage } from '../pages/product/houseChoose/houseChoose';
import { PostlistPage } from '../pages/more/postlist/postlist';
import { WalletPage } from '../pages/more/wallet/wallet';
import { DepositPage } from '../pages/more/wallet/deposit/deposit';
import { WithdrawPage } from '../pages/more/wallet/withdraw/withdraw';
import { VerifyPage } from '../pages/more/verify/verify';
import { ResetPage } from '../pages/more/reset/reset';
import { SetPage } from '../pages/more/set/set';
import { FeedbackPage } from '../pages/more/set/feedback/feedback';
import { CustPage } from '../pages/more/set/cust/cust';
import { AboutusPage } from '../pages/more/set/about/about';
import { CusPage } from '../pages/more/set/cus/cus';
import { PaypwdPage } from '../pages/more/paypwd/paypwd';
import { MyPage } from '../pages/more/my/my';
import { ForgetPage } from '../pages/login/forget/forget';
import { SearchPage } from '../pages/home/search/search';
import { PayPage } from '../pages/pay/pay';
import { PostfeePage } from '../pages/pay/postfee/postfee';
import { PayresultPage } from '../pages/pay/payresult/payresult';
import { ContactPage } from '../pages/contact/contact';
import { LookPage } from '../pages/contact/look/look';
import { ReviewPage } from '../pages/review/review';
import { CityPage } from '../pages/filter/city/city';
import { ToVerifyPage } from '../pages/more/verify/toVerify/toVerify';
import { AddressPage } from '../pages/more/my/address/address';
import { NationalityPage } from '../pages/more/my/nationality/nationality';
import { NamePage } from '../pages/more/my/name/name';
import { EmailPage } from '../pages/more/my/email/email';
import { TelPage } from '../pages/more/my/tel/tel';
import { SlookPage } from '../pages/contact/slook/slook';
import { RenewlistPage } from '../pages/pay/renewlist/renewlist';
import { WritePage } from '../pages/review/write/write';

import { DatePicker } from '@ionic-native/date-picker';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { ImagePicker } from "@ionic-native/image-picker";
import { Geolocation } from '@ionic-native/geolocation';
import { FileTransfer } from '@ionic-native/file-transfer';
import { NativeStorage } from '@ionic-native/native-storage';
import { PayPal } from '@ionic-native/paypal';
import { Camera } from '@ionic-native/camera';
import { VideoEditor } from '@ionic-native/video-editor';
import { AndroidPermissions } from '@ionic-native/android-permissions';
import { IonicStorageModule } from '@ionic/storage';
import { MultiPickerModule } from 'ion-multi-picker';
import { LaunchNavigator } from '@ionic-native/launch-navigator';
import { PhotoViewer } from '@ionic-native/photo-viewer';
import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
import { VideoPlayer } from '@ionic-native/video-player';
export function createTranslateLoader(http: HttpClient) {
  return new TranslateHttpLoader(http, './assets/i18n/', '.json');
}
@NgModule({
  declarations: [
    MyApp,
    AlertsPage,
    FavoritesPage,
    HomePage,
    TabsPage,
    LoginPage,
    RegistPage,
    MessagesPage,
    MorePage,
    PostlistPage,
    HomelistPage,
    FilterPage,
    HomePage,
    MypostPage,
    PostrentPage,
    PostbuyPage,
    PostperPage,
    PostservicePage,
    ProductrentPage,
    ProductservicePage,
    ProductperPage,
    ProductbuyPage,
    WalletPage,
    DepositPage,
    VerifyPage,
    ResetPage,
    SetPage,
    FeedbackPage,
    CustPage,
    AboutusPage,
    PaypwdPage,
    MyPage,
    ForgetPage,
    SearchPage,
    PostfeePage,
    PayPage,
    PayresultPage,
    ContactPage,
    LookPage,
    ReviewPage,
    CheckPage,
    WithdrawPage,
    CityPage,
    ToVerifyPage,
    AddressPage,
    NationalityPage,
    NamePage,
    EmailPage,
    SlookPage,
    RenewlistPage,
    WritePage,
    TelPage,
    HouseChoosePage,
    MoveoutPage,
    CusPage
  ],
  imports: [
    BrowserModule,
    HttpClientModule,
    IonicModule.forRoot(MyApp,{
      iconMode:'ios',
      mode:'ios',
      tabsHideOnSubPages: true,
    }),
    TranslateModule.forRoot({
      loader: {
        provide: TranslateLoader,
        useFactory: (createTranslateLoader),
        deps: [HttpClient]
      }
    }),
    IonicStorageModule.forRoot(),
    MultiPickerModule,
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    AlertsPage,
    FavoritesPage,
    HomePage,
    TabsPage,
    LoginPage,
    RegistPage,
    MessagesPage,
    MorePage,
    PostlistPage,
    HomelistPage,
    FilterPage,
    HomePage,
    MypostPage,
    PostrentPage,
    PostbuyPage,
    PostperPage,
    PostservicePage,
    ProductrentPage,
    ProductservicePage,
    HouseChoosePage,
    ProductperPage,
    ProductbuyPage,
    WalletPage,
    DepositPage,
    VerifyPage,
    ResetPage,
    SetPage,
    FeedbackPage,
    CustPage,
    AboutusPage,
    PaypwdPage,
    MyPage,
    ForgetPage,
    SearchPage,
    PostfeePage,
    PayPage,
    PayresultPage,
    ContactPage,
    LookPage,
    ReviewPage,
    CheckPage,
    WithdrawPage,
    CityPage,
    ToVerifyPage,
    AddressPage,
    NationalityPage,
    NamePage,
    EmailPage,
    SlookPage,
    RenewlistPage,
    WritePage,
    TelPage,
    MoveoutPage,
    CusPage
  ],
  providers: [
    DatePicker,
    StatusBar,
    SplashScreen,
    ImagePicker,
    Geolocation,
    FileTransfer,
    NativeStorage,
    PayPal,
    Camera,
    VideoEditor,
    AndroidPermissions,
    LaunchNavigator,
    PhotoViewer,
    VideoPlayer,
    {provide: ErrorHandler, useClass: IonicErrorHandler}
  ]
})

export class AppModule {
  
}
